package mini.hug;

import java.awt.Point;

import owg.util.Calc;
import owg.util.opengl.ColorF;
import hubol.Entity;

public class Flower extends Entity{
	private Shake s = Hug.me.shake();

	public Flower(Point p) {
		super(p.x, p.y);
		sprite = Hug.FLOWER;
		
		imageSingle = (int)Calc.random(3);
		xscale = 0;
		yscale = (float)(.25 + Calc.random(.2));
		
		setDepth(9000);
		//Sound.playPitched("flower");
	}
	
	public void step(){
		xscale = (float)Calc.approach(xscale, yscale, 4);
	}
	
	public void render(){
		sprite.render(imageSingle, x + s.x, y + s.y, xscale, xscale, (float)(s.z / 6.0), ColorF.WHITE);
	}

}
